<template>
    <a-form ref="formRef" :model="model" :labelCol="labelCol" :rules="rules">
        <a-row :gutter="[24, 24]">
            <slot></slot>
        </a-row>
    </a-form>
</template>
<script setup lang="ts">
import { ref } from 'vue';

const props = withDefaults(defineProps<{
    model: any,
    labelCol?:any,
    rules?: any
}>(), {
    labelCol: () => {
        return { style: { width: '120px' } }
    }
})

const formRef = ref()

const validate = async () => {
    await formRef.value.validate()
}
defineExpose({
    validate
})
</script>
